                <!-- BEGIN Page Title -->
                <div class="page-title">
                    <div>
                        <h1><i class="icon-group"></i> Group</h1>
                        <h4>Group Permission !</h4>
                    </div>
                </div>
                <!-- END Page Title -->

<form method="POST" id="frmContent" class="form-horizontal form-bordered" action="<?php echo $link_url; ?>">
                
				<div class="btn-toolbar text-right">
					<button class="btn btn-primary" type="submit"><i class="icon-save"></i> Save</button>
					<a href="<?php echo $cancel_url; ?>" class="btn btn-primary"><i class="icon-remove"></i> Cancel</a>
 				</div>                
                
                <!-- BEGIN Main Content -->
                <div class="row-fluid">
                    <div class="span12">
                        <div class="box">
                            <div class="box-title">
                                <h3><i class="icon-group"></i> <?php echo $box_title; ?></h3>
                            </div>
                            <div class="box-content">
							    
	                                    <div class="control-group">
	                                        <label class="control-label" for="textfield4">Group Name</label>
	                                        <div class="controls">
	                                            <input type="text" class="input-xlarge" value="<?php echo h($rowGroup["group_name"]); ?>" id="group_name" name="group_name"
	                                            data-rule-required="true" data-msg-required="Vui lòng nhập tiêu đề">
	                                        </div>
	                                    </div>
									    
	                                    <div class="control-group">
	                                        <label class="control-label" for="textfield4">Level</label>
	                                        <div class="controls">
	                                            <input type="text" class="input-small" value="<?php echo h($rowGroup["level"]); ?>" id="level" name="level">
	                                        </div>
	                                    </div>
	                                    
										<div class="control-group">
	                                       <label class="control-label"></label>
	                                       <div class="controls">
	                                       
		                                       <div class="span6">
													<span class="label label-xxlarge label-warning input-block-level">
		                                    			<b>Access module permission</b>
		                                    		</span>
		                                    		
													<div class="input-block-level" style="margin-top:5px; padding:5px; border:2px solid #ccc; height: 200px; overflow-y: scroll;">
													
													<?php foreach ($arrAcls as $rowAcl) : ?>
													
		                                            	<label class="checkbox">
		                                            		<input type="checkbox" value="<?php echo $rowAcl['access_url']; ?>" name="permission[access][]" <?php echo in_array($rowAcl['access_url'], df($arrAclResources['access'],array())) ? 'checked' : ''; ?>> 
		                                            		<?php echo h($rowAcl['title']); ?>	                                          		
		                                            	</label>
		                                          	
		                                          	<?php endforeach; ?>
		                                          		                                            
		                                          	</div>	                                    		
		                                    		
		                                    		<div class="btn-toolbar text-left">
		                                    			<a class="btn" onclick="$(this).parent().parent().find(':checkbox').prop('checked', true);"><i class="icon-check"></i> Select All</a>
														<a class="btn" onclick="$(this).parent().parent().find(':checkbox').prop('checked', false);"><i class="icon-check-empty"></i> Deselect All</a>	                                    			
	 												</div>
		                                       </div>
	                                       
		                                       <div class="span6">
		                                       
													<span class="label label-xxlarge label-important input-block-level">
		                                    			<b>Modify module permission</b>
		                                    		</span>
		                                    		
													<div class="input-block-level" style="margin-top:5px; padding:5px; border:2px solid #ccc; height: 200px; overflow-y: scroll;">
													
													<?php foreach ($arrAcls as $rowAcl) : ?>
													
		                                            	<label class="checkbox">
		                                            		<input type="checkbox" value="<?php echo $rowAcl['access_url']; ?>" name="permission[modify][]" <?php echo in_array($rowAcl['access_url'], df($arrAclResources['modify'],array())) ? 'checked' : ''; ?>> 
		                                            		<?php echo h($rowAcl['title']); ?>	                                          		
		                                            	</label>	                                            	
		                                          	
		                                          	<?php endforeach; ?>												
													
		                                          	</div>
		                                          	
		                                    		<div class="btn-toolbar text-left">
		                                    			<a class="btn" onclick="$(this).parent().parent().find(':checkbox').prop('checked', true);"><i class="icon-check"></i> Select All</a>
														<a class="btn" onclick="$(this).parent().parent().find(':checkbox').prop('checked', false);"><i class="icon-check-empty"></i> Deselect All</a>	                                    			
	 												</div>	                                          		                                       
		                                       </div>
	                                       
	                                       </div>
	                                    </div>	                                    
	                                    

										<div class="control-group">
	                                       	<label class="control-label">Active</label>
	                                       	<div class="controls">
	                                          	<label class="checkbox">
	                                            	<input type="checkbox" id="active" name="active" value="1" <?php echo n($rowGroup["active"])==1?'checked':''; ?> >
	                                          	</label>
	                                       	</div>
	                                    </div>                                    
			                                    
	                                    <div class="control-group">
	                                        <label class="control-label" for="textfield4">Order</label>
	                                        <div class="controls">
	                                            <input type="text" class="input-mini"  id="sort_order" name="sort_order" value="<?php echo n($rowGroup["sort_order"]); ?>">
	                                        </div>
	                                    </div>
	                                    

                            </div>                            
                                
                        </div>
                    </div>
                </div>
                <!-- END Main Content -->
                
                <?php if ($_isModify) : ?>
				<div class="btn-toolbar text-right">
					<button class="btn btn-primary" type="submit"><i class="icon-save"></i> Save</button>
					<a href="<?php echo $cancel_url; ?>" class="btn btn-primary"><i class="icon-remove"></i> Cancel</a>
 				</div>
 				<?php endif; ?>                
                
</form>                
                
<script type="text/javascript">
                
$(document).ready(function() {
	$("#frmContent").validate();

});

</script>                
                
